package com.ruoyi.system.service.impl;

import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ProFileBlueprintMapper;
import com.ruoyi.system.domain.ProFileBlueprint;
import com.ruoyi.system.service.IProFileBlueprintService;
import com.ruoyi.common.core.text.Convert;

/**
 * 工程文件上传Service业务层处理
 *
 * @author ruoyi
 * @date 2020-06-19
 */
@Service
public class ProFileBlueprintServiceImpl implements IProFileBlueprintService {
    @Autowired
    private ProFileBlueprintMapper proFileBlueprintMapper;

    /**
     * 查询工程文件上传
     *
     * @param pFileId 工程文件上传ID
     * @return 工程文件上传
     */
    @Override
    public ProFileBlueprint selectProFileBlueprintById(Integer pFileId) {
        return proFileBlueprintMapper.selectProFileBlueprintById(pFileId);
    }

    /**
     * 查询工程文件上传
     *
     * @param filePro 项目信息
     * @return 工程文件上传
     */
    @Override
    public List<ProFileBlueprint> selectProFileBlueprintByFile(Long filePro) {
        return proFileBlueprintMapper.selectProFileBlueprintByFile(filePro);
    }

    /**
     * 查询工程文件上传列表
     *
     * @param proFileBlueprint 工程文件上传
     * @return 工程文件上传
     */
    @Override
    public List<ProFileBlueprint> selectProFileBlueprintList(ProFileBlueprint proFileBlueprint) {
        return proFileBlueprintMapper.selectProFileBlueprintList(proFileBlueprint);
    }

    /**
     * 新增工程文件上传
     *
     * @param proFileBlueprint 工程文件上传
     * @return 结果
     */
    @Override
    public int insertProFileBlueprint(ProFileBlueprint proFileBlueprint) {
        proFileBlueprint.setpFileTime(new Date());
        return proFileBlueprintMapper.insertProFileBlueprint(proFileBlueprint);
    }

    /**
     * 修改工程文件上传
     *
     * @param proFileBlueprint 工程文件上传
     * @return 结果
     */
    @Override
    public int updateProFileBlueprint(ProFileBlueprint proFileBlueprint) {
        return proFileBlueprintMapper.updateProFileBlueprint(proFileBlueprint);
    }

    /**
     * 删除工程文件上传对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteProFileBlueprintByIds(String ids) {
        return proFileBlueprintMapper.deleteProFileBlueprintByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除工程文件上传信息
     *
     * @param pFileId 工程文件上传ID
     * @return 结果
     */
    @Override
    public int deleteProFileBlueprintById(Integer pFileId) {
        return proFileBlueprintMapper.deleteProFileBlueprintById(pFileId);
    }

    /**
     * 导出所有
     *
     * @param proFileBlueprint 用户信息
     * @return 用户信息集合信息
     */
    @Override
    public List<ProFileBlueprint> selectUserexports(ProFileBlueprint proFileBlueprint) {
        return proFileBlueprintMapper.selectUserexports(proFileBlueprint);
    }
}
